<%--
  Created by IntelliJ IDEA.
  User: zyj
  Date: 2021/12/22
  Time: 23:09
  To change this template use File | Settings | File Templates.
--%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>

    <!-- 引入Bootstrap3.3.7 -->
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">

    <!-- 引入datepicker.css -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/datepicker/bootstrap-datepicker.min.css">

    <!-- 引入 layui.css -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/layui/2.6.8/css/layui.min.css">

    <!-- 引入本地css文件 -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/student.css">

    <!-- 引入jquery -->
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>

    <!-- 引入 layui.js -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/layui/2.6.8/layui.min.js"></script>

    <!-- 引入bootstrap.js -->
    <script src="http://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

    <!-- 引入datepicker.js -->
    <script src="${pageContext.request.contextPath}/static/js/datepicker/bootstrap-datepicker.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/locales/bootstrap-datepicker.zh-CN.min.js"></script>

    <meta charset="utf-8">
    <title>学生首页</title>
</head>
<body>
<div class="container">
    <div class="toolbar">
        <ul class="layui-nav" lay-filter="">
            <img src="${pageContext.request.contextPath}/static/img/logo_green.png" class="logo" />
            <li id="index" class="layui-nav-item layui-this"><a href="#">首页</a></li>
            <li id="grade" class="layui-nav-item"><a href="${pageContext.request.contextPath}/student/grade">成绩查询</a></li>
            <li id="classes" class="layui-nav-item"><a href="${pageContext.request.contextPath}/student/selectCourse">选课</a></li>
            <li id="mine_class" class="layui-nav-item"><a href="${pageContext.request.contextPath}/student/mineCourse">已选课程</a></li>
            <li id="homework" class="layui-nav-item"><a href="${pageContext.request.contextPath}/student/allHomework">作业</a></li>

            <li class="toolbar_right"><a href="${pageContext.request.contextPath}/loginCheck/logOut">退出登录</a></li>
            <li class="toolbar_right">欢迎你！<span>${userId}</span> |</li>


        </ul>
    </div>

    <div>
        <iframe id="main_content" name="mainContent" src="${pageContext.request.contextPath}/studentIndex" class="item">
            <p>There is nothing to show</p>
        </iframe>
    </div>

</div>

<script>
    history.go(1);
    layui.use('element', function(){
        var element = layui.element;
    });

    var index = document.getElementById("index");
    var grade = document.getElementById("grade");
    var classes = document.getElementById("classes");
    var mine_class = document.getElementById("mine_class");
    var homework = document.getElementById("homework");
    var main_content = document.getElementById("main_content");

    <%--main_content.src = "${pageContext.request.contextPath}/studentGrade";--%>

    index.onclick = function() {
        main_content.src = "${pageContext.request.contextPath}/studentIndex";
    }

    grade.onclick = function() {
        main_content.src = "${pageContext.request.contextPath}/studentGrade";
    }

    classes.onclick = function() {
        main_content.src = "${pageContext.request.contextPath}/studentClass";
    }

    mine_class.onclick = function() {
        main_content.src = "${pageContext.request.contextPath}/studentMineClass";
    }

    homework.onclick = function() {
        main_content.src = "${pageContext.request.contextPath}/studentHomework";
    }

</script>

</body>
</html>

